package com.jz.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.jz.dao.TestDAO;
import com.jz.model.Test;

public class TestDAOImpl extends HibernateDaoSupport implements TestDAO {


	public List<Test> testList() {
		List testList = getHibernateTemplate().find("from Test");
		return testList;
		
	}

	public void insertTest(Test test) {
		getHibernateTemplate().save(test);
	}

	public void updateTest(Test test) {
		getHibernateTemplate().update(test);
	}

	public Test getTest(int number) {
		return (Test) getHibernateTemplate().get(Test.class, number);
	}

}
